/*
 * Adam Blackwell
 * ada2358@ccs.neu.edu
 */

/***********************************************************************
 * Fire class
 * 
 * Implements the 'fire' command
 *
 * Signature:
 *  public static Fire create ();
 *  public String name ();
 *  public boolean execute (String[] arguments);
 ***********************************************************************/

/**
 * @author Adam
 *
 */
public class Fire extends Command {
  protected Fire() {
    super("fire");
  }
  
  /**
   * Fire:
   * @return
   */
  public static Fire create() {
    return new Fire();
  }
  
  /* (non-Javadoc)
   * @see Command#execute(java.lang.String[])
   * @author Adam
   */
  public boolean execute(String[] args) {
    if (args.length > 2) {
      SpaceGame.me().fire(Integer.parseInt(args[1]), Integer.parseInt(args[2]));
      return true;
    } else {
      System.out.println("need arguments dx and dy");
      return false;
    }
  }
}
